//
//  GRhaggleModel.m
//  YC_GRice
//
//  Created by luojinrong11 on 2019/4/16.
//  Copyright © 2019年 YeCai. All rights reserved.
//

#import "GRhaggleModel.h"

@implementation GRhaggleModel
+ (NSDictionary *)modelCustomPropertyMapper{
    return @{
             @"des":@"description",
             @"isMyself":@"self"
             };
}


- (BOOL)modelCustomTransformFromDictionary:(NSDictionary *)dic{
    NSDictionary * goodDic = dic[@"goods"];
    if (Dictionary(goodDic)) {
        GRHagleGoodModel *model = [GRHagleGoodModel yy_modelWithDictionary:goodDic];
        self.goodModel = model;
    }
    NSDictionary * profileDic =  dic[@"profile"];
    
    if (Dictionary(profileDic)) {
        GRhaggleUserModel * profileModel =[GRhaggleUserModel yy_modelWithDictionary:profileDic];
        self.profile = profileModel;
    }
    NSArray * infoArr = dic[@"infoList"];
    if (Array(infoArr)) {
        NSMutableArray * array = [NSMutableArray array];
        for (NSDictionary * dic in infoArr) {
            GRhaggleUserModel * model = [GRhaggleUserModel yy_modelWithDictionary:dic];
            [array addObject:model];
            
        }
        self.infoList = array;
    }
    return YES;
}

// 如果实现了该方法，则处理过程中会忽略该列表内的所有属性
+ (NSArray *)modelPropertyBlacklist {
    return @[
             @"goods",
             @"infoList",
             @"profile"
             ];
}



@end

@implementation GRhaggleUserModel



@end
